package com.training.java.core.collections.one;

import java.util.LinkedList;
import java.util.List;

public class GenericsListDemo2 {

	public static void main(String[] args) {

		Car focus = new Car("Ford","Focus", 2014);
		Car volt = new Car("Chevy","Volt", 2013);
		Car cayenne = new Car("Porsche","Cayenne", 2015);
		
		List<Car> cars = new LinkedList<>();
		
		cars.add(focus);
		cars.add(cayenne); 
		cars.add(volt);
		
		Dealer dealer = new Dealer();
		dealer.loadCars(cars);
		
		for(Car car: cars)
		{
			System.out.println("Make = " + car.getMake());
		}
	}

}
